<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta name="keywords" content="甜爱，SweetLove,甜品，甜点，生日蛋糕，冰淇淋，冰品"/>
    <meta name="description" content="甜爱网上商城是专注于甜品销售、进口的网站，各种甜品、甜点齐全，还有解暑的各种冰品任顾客挑选，让他们感受到爱的温馨。">
    <meta charset="utf-8">
    <title>商品列表</title>
    <link rel="stylesheet" href="/fore/css/list.css">
    <script src="/fore/js/jquery-v1.10.2.min.js" type="text/javascript"></script>
</head>

<body>
<!--页头-->
<div th:replace="fore/include/header::head"></div>
<div class="banner">
    <ol></ol>
</div>
<!--内容-->
<div id="contentCon">
	<div>
    	<a href="javascript:;">当前位置&nbsp;&gt;</a>
        <a href="/fore/index" >首页&nbsp;&gt;</a>
        <a href="javascript:;" th:text="${pCategory.name}"></a>
    </div>
    <ul>

    	<li th:each="res:${product.getRecords}" class="prod">
        	<a th:href="@{/fore/product/detail(productId=${res.id})}">
                <img src="/fore/images/bing01.jpg" alt="">
            </a>
            <div>
            	<span th:if="${res.newArrival == 1}">新品</span>
                <ol>
                    <li th:text="${res.name}"></li>
                    <p th:text="'¥ ' + ${res.price / 100}"></p>
                </ol>
            </div>
        </li>
    </ul>

    <div class="page" th:if="${product.getPages() > 1}">
        <a th:href="@{/fore/product/list(category=${category},page=1)}" >首页</a>

        <a th:each="pageNum:${#numbers.sequence(0, product.getPages() - 1)}" th:href="@{/fore/product/list(category=${category},page=${pageNum + 1})}"  th:text="${pageNum + 1}"  th:attrappend="class=${pageNum + 1} eq ${page} ? 'curr' : ''" ></a>

        <a th:href="@{/fore/product/list(category=${category},page=${product.getPages()})}">尾页</a>
    </div>

</div>
<!--页脚-->
<div th:replace="fore/include/footer::foot"></div>
</body>
</html>
